[SPARK-14554][SQL] disable whole stage codegen if there are too many input columns#12322
Closed
cloud-fan wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-14554][SQL] disable whole stage codegen if there are too many input columns#12322cloud-fan wants to merge 2 commits intoapache:masterfrom
cloud-fan wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
Author
Contributor
|
LGTM, could you update the description? |
Contributor
Author
|
ok updated. |
|
Test build #55584 has finished for PR 12322 at commit
|
|
Test build #55586 has finished for PR 12322 at commit
|
Contributor
|
Thanks. Merging to master. |
| test("SPARK-14554: Dataset.map may generate wrong java code for wide table") { | ||
| val wideDF = sqlContext.range(10).select(Seq.tabulate(1000) {i => ('id + i).as(s"c$i")} : _*) | ||
| // Make sure the generated code for this plan can compile and execute. | ||
| wideDF.map(_.getLong(0)).collect() |
Contributor
There was a problem hiding this comment.
We should still use checkAnswer here because it provides extra debugging info when there is an exception.
Member
There was a problem hiding this comment.
Do you know why this test case is super slow? It took more than 5 minutes to finish it. Is this expected?
- SPARK-14554: Dataset.map may generate wrong java code for wide table (5 minutes, 20 seconds)
See the link: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/59079/consoleFull
asfgit
pushed a commit
that referenced
this pull request
Apr 13, 2016
## What changes were proposed in this pull request? address this comment: #12322 (comment) ## How was this patch tested? N/A Author: Wenchen Fan <wenchen@databricks.com> Closes #12346 from cloud-fan/tmp.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
In https://github.com/apache/spark/pull/12047/files#diff-94a1f59bcc9b6758c4ca874652437634R529, we may split field expressions codes in
CreateExternalRowto support wide table. However, the whole stage codegen framework doesn't support it, because the input for expressions is not always the input row, but can beCodeGenContext.currentVars, which doesn't work well withCodeGenContext.splitExpressions.Actually we do have a check to guard against this cases, but it's incomplete, it only checks output fields.
This PR improves the whole stage codegen support check, to disable it if there are too many input fields, so that we can avoid splitting field expressions codes in
CreateExternalRowfor whole stage codegen.TODO: Is it a better solution if we can make
CodeGenContext.currentVarswork well withCodeGenContext.splitExpressions?How was this patch tested?
new test in DatasetSuite.